////--------------------------------------------------------------------------------------
//// File: Tutorial02.fx
////
//// Copyright (c) Microsoft Corporation. All rights reserved.
////--------------------------------------------------------------------------------------

//struct VsInput
//{	
//	float4 pos : POSITION;
//	float4 colour : COLOR;
//};


//struct VsOutput
//{
//	float4 pos : SV_POSITION;
//	float4 colour : COLOR;
//};

////--------------------------------------------------------------------------------------
//// Vertex Shader
////--------------------------------------------------------------------------------------
//VsOutput VS(VsInput input)
//{
//	VsOutput output = (VsOutput)0;
//	output.pos = input.pos;
//	output.colour = input.colour;

//	output.pos += float4(0, 0, 0, 0);

//	return output;
//}

////--------------------------------------------------------------------------------------
//// Pixel Shader
////--------------------------------------------------------------------------------------
//float4 PS(VsOutput output) : SV_Target
//{
//	return output.colour;

//	//return float4(1, 0, 0, 1);

//    //return float4( 0.5f, 1.0f, 0.0f, 1.0f );    // Yellow, with Alpha = 1
//}

//--------------------------------------------------------------------------------------
// File: Tutorial04.fx
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------
// Constant Buffer Variables
//--------------------------------------------------------------------------------------
cbuffer ConstantBuffer : register( b1 )
{
	matrix World;
	matrix View;
	matrix Projection;
}

//--------------------------------------------------------------------------------------
struct VS_OUTPUT
{
    float4 Pos : SV_POSITION;
    float4 Color : COLOR0;
};

//--------------------------------------------------------------------------------------
// Vertex Shader
//--------------------------------------------------------------------------------------
VS_OUTPUT VS( float4 Pos : POSITION, float4 Color : COLOR )
{
    VS_OUTPUT output = (VS_OUTPUT)0;
    output.Pos = mul( Pos, World );
    output.Pos = mul( output.Pos, View );
    output.Pos = mul( output.Pos, Projection );
    output.Color = Color;

	//output.Pos.z -= 20.0f;
    return output;
}


//--------------------------------------------------------------------------------------
// Pixel Shader
//--------------------------------------------------------------------------------------
float4 PS( VS_OUTPUT input ) : SV_Target
{
    return input.Color;
}
